export const noFound = () => Response.json({ success: false, msg: '方法不存在' });

export const handleGET = (getMap, request: Request, options: Options) => ((getMap as any)[options.params.fnName] || noFound)?.(request);

export const handlePOST = (postMap, request: Request, options: Options) => ((postMap as any)[options.params.fnName] || noFound)?.(request);
